<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<table>

    <tr class="aa">
        <td><input type="text"></td>
        <td><input type="text"></td>
    </tr>

    <tr class="aa">
        <td><input type="text"></td>
        <td><input type="text"></td>
    </tr>

    <tr class="aa">
        <td><input type="text"></td>
        <td><input type="text"></td>
    </tr>
    <button onclick="fun()">点击获取
    </button>
</table>
<script>

    function fun() {
        var tr = document.getElementsByClassName("aa");
        for (var i = 0; i < tr.length; i++) {
            var td = tr[i].getElementsByTagName("td");
            console.log(td[0].getElementsByTagName("input")[0].value);
            console.log(td[1].getElementsByTagName("input")[0].value);
        }
    }
</script>
</body>
<html>
